// flex布局
#flex(@direction: row, @justify-content: flex-start, @align-items: flex-start) {
	
	display: flex;
	flex-direction: @direction;
	justify-content: @justify-content;
	align-items: @align-items;
}

// 文本
#font(@size: 24rpx, @color: #333, @weight: 500,@family:'思源黑体') {
	font-family: @family;
	font-size: @size;
	color: @color;
	font-weight: @weight;
	line-height: @size;
}

// 遮罩
#mask(@position:fixed,@backgroundColor:rgba(0, 0, 0, 0.5),@zIndex:999) {
	position: @position;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: @backgroundColor;
	z-index: @zIndex;
}

// 宽高
#box(@width:50rpx,@height:@width,@borderRadius:0,@background:none,@border:none){
	width: @width;
	height: @height;
	border-radius: @borderRadius;
	border: @border;
	background:@background;
}

// 居中定位
#popCenter(@width,@bottom:60rpx){
	position: fixed;
	bottom: @bottom;
	left: 50%;
	margin-left: (@width /2) - @width;
	
}

// 定位
#position(@position:relative,@top:0,@left:0){
	position: @position;
	top: @top;
	left: @left;
}

//padding
#padding(@padding){
	box-sizing: border-box;
	padding: @padding;
}

// 文本超出省略
#textOmit(@type){
	
	// 单行文本
	.text(@type-child) when ( @type-child = 1 ){
		    white-space: nowrap;
		    text-overflow: ellipsis;
		    overflow: hidden;
		    word-break: break-all;
	}
	
	// 多行文本
	.text(@type-child) when ( @type-child > 1 ){
		    text-overflow: -o-ellipsis-lastline;
		      overflow: hidden;
		      text-overflow: ellipsis;
		      display: -webkit-box;
		      -webkit-line-clamp: @type-child;
		      line-clamp: 2;
		      -webkit-box-orient: vertical
	}
	
	.text(@type)
	
}